import { request } from '@/utils/request.js'
import { appConfig } from '@/config/config.js'

// 账号密码注册
export function register (params) {
  return request.post(appConfig.WEB_API + '/register', params)  
}

// 账号密码登录
export function login (params) {
  return request.post(appConfig.WEB_API + '/login', params)  
}

// 发送手机验证码
export function sendCode (params) {
  return request.post(appConfig.WEB_API + '/sendCode', params)  
}

// 验证码登录
export function loginByVerificationCode (params) {
  return request.post(appConfig.WEB_API + '/loginByVerificationCode', params)  
}


// 微信小程序-调用后台登录
export function loginByWx (params) {
  return request.post(appConfig.WEB_API + '/loginByWx', params)  
}

// APP-微信调用后台登录
export function appLoginByWx (params) {
  return request.post(appConfig.WEB_API + '/appLoginByWx', params)  
}

// APP-QQ调用后台登录
export function appLoginByQQ (params) {
  return request.post(appConfig.WEB_API + '/appLoginByQQ', params)  
}


